package com.xmut.mall.search.feign;

import com.xmut.mall.search.utils.RespBean;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient("mall-coupon")
public interface CouponFeignClient {

    /**
     * 获取商品详情里的满减优惠的信息
     * @param skuId
     * @return
     */
    @GetMapping("/coupon/fulldiscount/getProductDetailFullDiscount/{skuId}")
    RespBean getProductDetailFullDiscount(@PathVariable Long skuId);

    /**
     * 获取商品详情中的优惠券信息
     * @param skuId
     * @return
     */
    @GetMapping("/coupon/coupon/getProductDetailCoupon/{skuId}/{cateId}")
    RespBean getProductDetailCoupon(@PathVariable("skuId") Long skuId,@PathVariable("cateId") Long cateId);

    /**
     * 获取全部的优惠券
     * @return
     */
    @GetMapping("/coupon/coupon/getCoupon")
    RespBean getCoupon();

    /**
     * 根据skuId获取当前sku商品的满减信息
     * @param skuId
     * @return
     */
    @GetMapping("/coupon/skufullreduction/getFullReduceInfoBySkuId/{skuId}")
    RespBean getFullReduceInfoBySkuId(@PathVariable Long skuId);
}
